package main

import (
	"fmt"
	"github.com/gocolly/colly/v2"
	"go-study/src/sjcc/utils"
	"log"
)

func main() {

	log.Println("========== go program start =========")

	utils.GetRequestMajorValue(367878, 692157514)

	//db.GetGormDB()
	log.Println("========= go program end ==========")

}

func Colly() []string {
	c := colly.NewCollector()
	var hrefList []string
	c.OnHTML("a[href]", func(e *colly.HTMLElement) {
		link := e.Attr("href")
		hrefList = append(hrefList, link)
	})

	err := c.Visit("https://yz.chsi.com.cn/sch/schoolInfo--schId-367878.dhtml")
	if err != nil {
		fmt.Println("Error:", err)
	}
	return hrefList
}
